<div class="layui-tab layui-tab-brief message-tab">
    <script id="messageView" type="text/html">
        <ul class="layui-tab-title">
            <li class="layui-this">通知({{d.notices.length}})</li>
            <li>反馈({{d.messages.length}})</li>
            <li>待办({{d.schedules.length}})</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="message-list">
                    {{# layui.each(d.notices, function(index, item){ }}
                    <a class="message-list-item" href="javascript:;">
                        <img class="message-item-icon" src="{{item.icon}}">
                        <div class="message-item-right">
                            <h2 class="message-item-title">{{item.title}}</h2>
                            <p class="message-item-text">{{item.time}}</p>
                        </div>
                    </a>
                    {{# }); }}
                    <!-- 列表为空 -->
                    <div class="message-list-empty">
                        <img src="/images/img_msg_notice.png">
                        <div>没有通知</div>
                    </div>
                </div>
                <a class="message-btn-clear" href="javascript:;">全部标记已读</a>
            </div>
            <div class="layui-tab-item">
                <div class="message-list">
                    {{# layui.each(d.messages, function(index, item){ }}
                    <a class="message-list-item" href="javascript:;">
                        <img class="message-item-icon" src="{{item.icon}}">
                        <div class="message-item-right">
                            <h2 class="message-item-title">{{item.title}}</h2>
                            <p class="message-item-text">{{item.content}}</p>
                            <p class="message-item-text">{{item.time}}</p>
                        </div>
                    </a>
                    {{# }); }}
                    <a id="btn-more1" class="message-btn-more" href="javascript:;">加载更多</a>
                    <!-- 列表为空 -->
                    <div class="message-list-empty">
                        <img src="/images/img_msg_pri.png">
                        <div>没有消息</div>
                    </div>
                </div>
                <a class="message-btn-clear" href="javascript:;">清空消息</a>
            </div>
            <div class="layui-tab-item">
                <div class="message-list">
                    {{# layui.each(d.schedules, function(index, item){ }}
                    <a class="message-list-item" href="javascript:;">
                        <div class="message-item-right">
                            {{# if(item.state==1){ }}
                            <span class="layui-badge pull-right">待订单审核</span>
                            {{# } }}
                            {{# if(item.state==2){ }}
                            <span class="layui-badge layui-bg-gray pull-right">待退货审核</span>
                            {{# } }}
                            <h2 class="message-item-title">{{item.title}}</h2>
                            <p class="message-item-text">{{item.time}}</p>
                        </div>
                    </a>
                    {{# }); }}
                    <!-- 列表为空 -->
                    <div class="message-list-empty">
                        <img src="/images/img_msg_db.png">
                        <div>没有待办</div>
                    </div>
                </div>
                <a class="message-btn-clear" href="javascript:;">清空待办</a>
            </div>
        </div>
    </script>
</div>
<!-- js部分 -->
<script type="text/javascript">
    layui.use('LAY_shared_message', layui.factory('LAY_shared_message'));
</script>